import pyperclip

from ._ReadYaml import ReadYaml


class ReportBug:
    def __init__(self):
        config = ReadYaml.__call__()
        self._bug_template = config.get('bug_report', "get bug_report error")
        self._fix_template = config.get('fix_bug', "get fix_bug error")

    def report_bug(self):
        """
        :return:返回提交bug模板
        """
        pyperclip.copy(self._bug_template)

    def fix_bug(self):
        """
        :return:返回关闭bug模板
        """
        pyperclip.copy(self._fix_template)
